The TWS API lets you subscribe to historical data to receive updates automatically in order to circumvent some of the historical data limitations already mentioned. By invoking the reqRealTimeBars method, your client application will receive the bar from the last five seconds.
Using IBSampleApp, you request real-time historical bars using the Bar Request section of the Market Data tab. This time, fill in the fields and then click the Real Time button. The output is displayed in a grid as shown below.